package a.f.i;

import a.c.y;
import a.c.z;
import a.d.t;
import a.d.w;

class c
{
  public t a = null;
  public z b = new z();
  public boolean c = false;
  private z d = new z();
  private t e = null;
  private boolean g = true;
  
  public boolean a()
  {
    return this.g;
  }
  
  public void a(boolean paramBoolean)
  {
    this.g = paramBoolean;
  }
  
  void a(t paramt, double paramDouble)
  {
    boolean bool2 = a.wb;
    boolean bool1 = a.vb;
    double d1 = paramt.b() / 2.0D;
    double d2 = paramt.c() / 2.0D;
    Object localObject;
    if (!bool2) {
      if (this.a != null)
      {
        if (!bool2) {
          if (paramt.b() <= this.a.b())
          {
            if (bool2) {
              break label168;
            }
            if (paramt.c() <= this.a.c())
            {
              localObject = new t(this.a.d() + d1, this.a.e() + d2, this.a.b() - paramt.b(), this.a.c() - paramt.c());
              if (bool2) {
                break label342;
              }
              this.e = a((t)localObject, paramDouble, false);
              if (!bool1) {
                break label341;
              }
            }
          }
        }
        label168:
        if (!bool2) {
          if (paramt.b() <= this.a.b())
          {
            localObject = new t(this.a.d() + d1, this.a.e() + this.a.c(), this.a.b() - paramt.b(), 0.0D);
            if (bool2) {
              break label342;
            }
            this.e = a((t)localObject, paramDouble, false);
            if (!bool1) {
              break label341;
            }
          }
        }
        if ((bool2) || (paramt.c() <= this.a.c()))
        {
          localObject = new t(this.a.d() + this.a.b() / 2.0D, this.a.e() + d2, 0.0D, this.a.c() - paramt.c());
          if (bool2) {
            break label342;
          }
          this.e = a((t)localObject, paramDouble, false);
          if (!bool1) {}
        }
        else
        {
          this.e = null;
        }
      }
    }
    label341:
    label342:
    if ((bool2) || (this.b != null))
    {
      localObject = this.b.h();
      do
      {
        if (!((y)localObject).e()) {
          break;
        }
        t localt1 = (t)((y)localObject).j();
        t localt2 = new t(localt1.d() - d1, localt1.e() - d2, localt1.b() + paramt.b(), localt1.c() + paramt.c());
        this.d.add(a(localt2, paramDouble, true));
        ((y)localObject).f();
      } while (!bool1);
    }
  }
  
  static t a(t paramt, double paramDouble, boolean paramBoolean)
  {
    if (paramt == null) {
      return null;
    }
    if (paramBoolean) {
      return new t((int)Math.floor(paramt.d / paramDouble), (int)Math.floor(paramt.e / paramDouble), (int)Math.ceil(paramt.a / paramDouble) + 1, (int)Math.ceil(paramt.b / paramDouble) + 1);
    }
    return new t((int)Math.ceil(paramt.d / paramDouble), (int)Math.ceil(paramt.e / paramDouble), Math.max(1, (int)Math.floor(paramt.a / paramDouble) - 1), Math.max(1, (int)Math.floor(paramt.b / paramDouble) - 1));
  }
  
  boolean b()
  {
    return (a.wb) || ((this.a != null) && (this.e == null));
  }
  
  int d()
  {
    if ((a.wb) || (this.e != null)) {
      return (int)Math.ceil(Math.sqrt(this.e.b() * this.e.b() + this.e.c() * this.e.c()));
    }
    return 2147483647;
  }
  
  boolean a(w paramw)
  {
    boolean bool2 = a.wb;
    boolean bool1 = a.vb;
    if (!bool2) {
      if (this.d != null)
      {
        y localy = this.d.h();
        do
        {
          if (!localy.e()) {
            break;
          }
          t localt = (t)localy.j();
          if (bool1) {
            break label84;
          }
          if (a(localt, paramw)) {
            return false;
          }
          localy.f();
        } while (!bool1);
      }
    }
    if ((bool2) || (a())) {
      label84:
      if ((bool2) || (this.e != null)) {
        return a(this.e, paramw);
      }
    }
    return true;
  }
  
  private static boolean a(t paramt, w paramw)
  {
    boolean bool = a.wb;
    if (((bool) || (paramw.a >= paramt.d)) && ((bool) || (paramw.a - paramt.d <= paramt.a)) && ((bool) || (paramw.b >= paramt.e))) {
      if (bool) {}
    }
    return paramw.b - paramt.e <= paramt.b;
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.i.c
 * JD-Core Version:    0.7.0.1
 */